package com.example.dragandview.seniorUI;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TabHost;

import com.example.dragandview.R;

public class TabActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.seniorui_tab);
        TabHost tabHost = findViewById(android.R.id.tabhost);
        tabHost.setup();
        LayoutInflater layoutInflater = LayoutInflater.from(this);
        layoutInflater.inflate(R.layout.seniorui_tab_tab1,tabHost.getTabContentView());
        layoutInflater.inflate(R.layout.seniorui_tab_tab2,tabHost.getTabContentView());
        tabHost.addTab(tabHost.newTabSpec("seniorui_tab_tab1").setIndicator("精选录像").setContent(R.id.id_tab_left));
        tabHost.addTab(tabHost.newTabSpec("seniorui_tab_tab2").setIndicator("投稿录像").setContent(R.id.id_tab_right));
    }
}
